package com.leiou.pojo;

import java.beans.Transient;
import java.io.Serializable;

/*
 *  胡又中
 * */
public class Dormitory implements Serializable {
    // 宿舍实体类
    private Integer dormId;          // 宿舍ID（主键），int → Integer
    private String dormNumber;       // 宿舍号，varchar → String
    private String dormType;         // 宿舍类型，varchar → String
    private Integer totalBeds;       // 总床位数，int → Integer
    private Integer occupiedBeds;    // 已占床位数，int → Integer
    private Integer availableBeds;   // 可用床位数，(COMPUTED) → 计算属性
    private String building;         // 楼栋，varchar → String
    private String floor;            // 楼层，varchar → String
    private String manager;          // 管理员，varchar → String

    public Integer getDormId() {
        return dormId;
    }

    public void setDormId(Integer dormId) {
        this.dormId = dormId;
    }

    public String getDormNumber() {
        return dormNumber;
    }

    public void setDormNumber(String dormNumber) {
        this.dormNumber = dormNumber;
    }

    public String getDormType() {
        return dormType;
    }

    public void setDormType(String dormType) {
        this.dormType = dormType;
    }

    public Integer getTotalBeds() {
        return totalBeds;
    }

    public void setTotalBeds(Integer totalBeds) {
        this.totalBeds = totalBeds;
    }

    public Integer getOccupiedBeds() {
        return occupiedBeds;
    }

    public void setOccupiedBeds(Integer occupiedBeds) {
        this.occupiedBeds = occupiedBeds;
    }

    public Integer getAvailableBeds() {
        return availableBeds;
    }

    public void setAvailableBeds(Integer availableBeds) {
        this.availableBeds = availableBeds;
    }

    public String getBuilding() {
        return building;
    }

    public void setBuilding(String building) {
        this.building = building;
    }

    public String getFloor() {
        return floor;
    }

    public void setFloor(String floor) {
        this.floor = floor;
    }

    public String getManager() {
        return manager;
    }

    public void setManager(String manager) {
        this.manager = manager;
    }

    @Override
    public String toString() {
        return "Dormitory{" +
                "dormId=" + dormId +
                ", dormNumber='" + dormNumber + '\'' +
                ", dormType='" + dormType + '\'' +
                ", totalBeds=" + totalBeds +
                ", occupiedBeds=" + occupiedBeds +
                ", availableBeds=" + availableBeds +
                ", building='" + building + '\'' +
                ", floor='" + floor + '\'' +
                ", manager='" + manager + '\'' +
                '}';
    }

    public Dormitory() {
    }

    public Dormitory(Integer dormId, String dormNumber, String dormType, Integer totalBeds, Integer occupiedBeds, Integer availableBeds, String building, String floor, String manager) {
        this.dormId = dormId;
        this.dormNumber = dormNumber;
        this.dormType = dormType;
        this.totalBeds = totalBeds;
        this.occupiedBeds = occupiedBeds;
        this.availableBeds = availableBeds;
        this.building = building;
        this.floor = floor;
        this.manager = manager;
    }
}
